﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace 继承_变量与方法访问规则
{
    class Father
    {
        public int age = 30;
    }
    class Son : Father
    {
        public int age = 10;
    }
    internal class Program
    {
        static void Main(string[] args)
        {
            Son son = new Son();
            Console.WriteLine(son.age);

            Console.Read();
        }
    }
}
